package net.skystudio.es.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import net.skystudio.es.common.BaseEntity;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

@Data
@TableName("tb_item_desc")
@Document(indexName = "tb_item_desc")
public class ItemDesc extends BaseEntity {

    private static final long serialVersionUID=1L;

    @Id
    @TableId(value = "id", type = IdType.UUID)
    private String id;

    @Field(type = FieldType.Text,analyzer = "ik_max_word",fielddata = true)
    @TableField("title")
    private String title;

    @Field(type = FieldType.Text,  analyzer = "ik_max_word")
    @TableField("content")
    private String content;

    /**
     * @TableId(value = "id", type = IdType.AUTO)
     *     private Long id;
     *
     *     @TableField("title")
     *     private String title;
     *
     *     @TableField("content")
     *     private String content;
     */


}
